home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
bbsutil
/
fwkcs117.zip
/
REPLACE.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-02-12
|
5KB
|
147 lines
@echo off
cls
echo - Part of FWKCS(TM) Contents_Signature System, Version 1.17.
echo - (C)Copyright Frederick W. Kantor 1989-1992. All rights reserved.
echo -
echo - Your use of the FWKCS(TM) Contents_Signature System is at solely your own
echo - risk. For safety, please have proper backups of your files.
echo -
echo - REPLACE.BAT to replace a working FWKCS(TM) system, Ver. 1.12 or later;
echo - for use in same directory with FWKCS117.ZIP, FWKCS.117, and FWKCS_TM.117.
echo -
echo - To proceed, have QBASIC, GWBASIC, BASICA, or BASIC available on your path,
echo - as appropriate for your operating system;
echo - have a working copy of FWKCS.COM in \CSA, containing your
echo - macros, paths, etc.
echo - (If you are installing FWKCS(TM) for the first time, use INSTALL.BAT.)
echo - ~~~~~~~~~~~
echo - Usage: REPLACE d D "<enter>"
echo -
echo - where d without ":" is the drive for the \CS directory
echo - D without ":" is the drive for the \CSA directory
if "%1" == "/*" goto end
if .%1 == . goto nd
if .%2 == . goto nod2
echo -
echo - Are these drives correct: %1:\CS and %2:\CSA ? If not, stop now!
echo - To quit, press Ctrl+C, then y ~~~~~~~~
echo -
pause
if not exist fwkcs117.zip goto nv117
if exist 0_setup.bat del 0_setup.bat > nul
if exist 0_setup.bat attrib -r 0_setup.bat > nul
if exist 0_setup.bat del 0_setup.bat > nul
pkunzip 0_setup.bat > nul
if errorlevel 1 goto zex
goto nz
:zex
if exist 2_setup.bat del 2_setup.bat > nul
if exist 2_setup.bat attrib -r 2_setup.bat > nul
if exist 2_setup.bat del 2_setup.bat > nul
if exist s_setup.bat del s_setup.bat > nul
if exist s_setup.bat attrib -r s_setup.bat > nul
if exist s_setup.bat del s_setup.bat > nul
if exist myowncsl.srt del myowncsl.srt > nul
if exist myowncsl.srt attrib -r myowncsl.srt > nul
if exist myowncsl.srt del myowncsl.srt > nul
if exist #@!#@!^^.@!@ del #@!#@!^^.@!@ > nul
if exist #@!#@!^^.@!@ attrib -r #@!#@!^^.@!@ > nul
if exist #@!#@!^^.@!@ del #@!#@!^^.@!@ > nul
if exist @@!#@!^^.@!@ del @@!#@!^^.@!@ > nul
if exist @@!#@!^^.@!@ attrib -r @@!#@!^^.@!@ > nul
if exist @@!#@!^^.@!@ del @@!#@!^^.@!@ > nul
echo sort test > #@!#@!^^.@!@
qsort #@!#@!^^.@!@ @@!#@!^^.@!@ > nul
del #@!#@!^^.@!@ > nul
if not exist @@!#@!^^.@!@ goto nsrt
cls
del @@!#@!^^.@!@ > nul
if not exist fwkcstmp.117 goto n1
if exist fwkhi.com del fwkhi.com > nul
if exist fwkhi.com attrib -r fwkhi.com > nul
if exist fwkhi.com del fwkhi.com > nul
pkunzip -o fwkcstmp.117 fwkhi.com > nul
if exist fwkhi.com goto n2
:n1
if not exist fwkcs.117 goto nd
if not exist fwkcs_tm.117 goto cm
ren fwkcs_tm.117 fwkcs_tm.com > nul
fwkcs_tm < fwkcs.117 >fwkcstmp.117
if errorlevel 1 goto fbad
ren fwkcs_tm.com fwkcs_tm.117 > nul
pkunzip -o fwkcstmp.117 fwkhi.com > nul
if not exist fwkhi.com goto fbad
:n2
cls
echo -
echo - Should I enter FWKCS117.ZIP's contents_signatures for future reference?
echo -
echo - Press either 0 or 1 to answer: 0 = NO. 1 = YES.
echo -
:ask1
fwkhi
if errorlevel 2 goto ask1
if not errorlevel 1 goto nocs
if exist fwkcs117.zip ren fwkcs117.zip @@!#@!^^.@!@ > nul
ren fwkcstmp.117 fwkcs117.zip > nul
pkunzip -o fwkcs117.zip fwkcs.com > nul
fwkcs /1 fwkcs117.zip #@!#@!^^.@!@
ren fwkcs117.zip fwkcstmp.117 > nul
if exist @@!#@!^^.@!@ ren @@!#@!^^.@!@ fwkcs117.zip > nul
if not exist fwkcs.com pkunzip fwkcs117.zip fwkcs.com > nul
if exist fwkcs117.zip fwkcs /1 fwkcs117.zip >> #@!#@!^^.@!@
qsort #@!#@!^^.@!@
fwkcs #@!#@!^^.@!@ nul myowncsl.srt /ms
del #@!#@!^^.@!@ > nul
del fwkcs.com > nul
:nocs
pkunzip fwkcstmp.117 s_setup.bat > nul
del fwkhi.com > nul
s_setup %1 ! %2 0
:nv117
echo -
echo - REPLACE.BAT is for use in the same directory with all these
echo - files together: FWKCS117.ZIP, FWKCS.117, and FWKCS_TM.117.
goto clu
:nz
echo -
echo - Where is Phil Katz's PKUNZIP(R)?
goto nz1
:nsrt
echo -
echo - Where is Ben Baker's QSORT Version 3.20 ?
:nz1
echo -
echo - Please check your path and mapping...
echo -
echo - After you correct this problem,
goto helpr
:fbad
del fwkcstmp.117 > nul
ren fwkcs_tm.com fwkcs_tm.117 > nul
echo -
echo - Bad file. Execution aborted.
:clu
echo -
echo - Please clean up, and try again. See README.TXT.
goto end
:cm
echo -
echo - I need FWKCS_TM.117.
echo -
echo - I quit!
goto end
:nod2
echo -
echo - I need two drive entries (they can both have the same letter).
:helpr
echo -
echo - Please try again...
goto end
:nd
echo -
echo - Nothing to do!
:end
if exist fwkhi.com del fwkhi.com > nul
echo -